import React, {
    Component,
} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Dimensions,
    TouchableOpacity,
    Image,
    ScrollView, TextInput
} from 'react-native';


export default class ReceiveAccountBox extends Component {

    render() {
        return (
            <View style={styles.container}>
                <View style={styles.infoBox}>
                    <Text style={[styles.itemTitleText, { fontSize: 16, fontWeight: '500' }]}>收款账户</Text>
                    {this.props.isShowModify ?
                        <TouchableOpacity
                            style={styles.accountBox}
                            onPress={() => {
                                this.props.navigation.navigate('BankCardSelectPage', { selectedCardId: this.props.receivePaymentBankId, completion: this.props.completion })
                            }}
                        >
                            <Text style={styles.itemTitleText}>修改账户</Text>
                        </TouchableOpacity>

                        :
                        null}

                </View>
                <View style={styles.infoBox}>
                    <Text style={styles.itemTitleText}>收款银行</Text>
                    <Text style={styles.itemDesText}>{this.props.receivePaymentBank}</Text>

                </View>
                <View style={styles.infoBox}>
                    <Text style={styles.itemTitleText}>收款账户</Text>

                    <Text style={styles.itemDesText}>{this.props.receivePaymentBankAccount}</Text>
                </View>
                <View style={styles.infoBox}>
                    <Text style={styles.itemTitleText}>账户名称</Text>
                    <Text style={styles.itemDesText}>{this.props.receivePaymentAccountName}</Text>

                </View>
            </View>
        )
    }

}

const styles = StyleSheet.create({
    container: {
        marginTop: 10,
        width: '100%',
        flexDirection: 'column',
        backgroundColor: '#fff',
        borderRadius: 6,
        paddingHorizontal: 16,
    },
    titleText: {
        marginBottom: 12,
        fontSize: 14,
        fontWeight: '500',
        color: '#333333'
    },
    infoBox: {
        height: 46,
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'space-between',
    },
    accountBox: {
        height: '100%',
        justifyContent: 'center',
        alignItems: 'center',
    },
    itemTitleText: {
        color: '#333',
        fontSize: 14,
    },
    itemDesText: {
        fontSize: 14,
        color: '#333'
    }

})